﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Daycare.Models;
using Daycare.DAL;

namespace Daycare.Services
{
    public class ChildService
    {
        private static ChildRepository cr = new ChildRepository();

        public Child insertChild(Child child)
        {
            child.familyId = cr.InsertChild(child.firstName, child.middleName, child.lastName, child.nickName, child.dateOfBirth, child.familyId, child.childImage.imageId, child.isActive);
            return child;
        }

        public void updateChild(Child child)
        {
            cr.UpdateChild(child.childId, child.firstName, child.middleName, child.lastName, child.nickName, child.dateOfBirth, child.childImage.imageId, child.isActive);
        }
    }
}